@use "./mixins" as *;
form.form {
	display: flex;
	flex-direction: column;
	row-gap: 10px;
	h1 {
		font-size: 18px;
		font-weight: bold;
		text-align: center;
	}
	> fieldset {
		padding: 10px;
		display: flex;
		flex-direction: column;
		row-gap: 10px;
		background-color: #232323;
		border-radius: 10px;
		legend {
			padding: 4px 12px;
			font-weight: bold;
			background-color: #232323;
			border-radius: 10px;
			box-shadow: 0 0 3px 1px #444;
		}
	}
}
details.details {
	padding: 10px;
	display: flex;
	flex-direction: column;
	background-color: #232323;
	border-radius: 10px;
	summary {
		cursor: pointer;
		font-size: 16px;
		line-height: 20px;
		@include text-ellipsis();
		&::before {
			content: "\23F5";
			margin-right: 10px;
			font-size: 18px;
			transition: transform 0.2s;
			display: inline-block;
		}
	}
	&[open] {
		> summary {
			margin-bottom: 10px;
			&::before {
				transform: rotate(90deg);
			}
		}
	}
	fieldset {
		display: flex;
		flex-direction: column;
		row-gap: 10px;
	}
	.details {
		box-shadow: 0 0 3px 1px #666;
	}
}
.form-item {
	input {
		&:not([type]),
		&[type="text"],
		&[type="password"],
		&[type="number"],
		&[type="url"],
		&[type="color"] {
			box-sizing: border-box;
			padding: 0 6px;
			width: 100%;
			height: 30px;
			background-color: #111;
			line-height: 30px;
			border-radius: 4px;
			transition: box-shadow 0.2s;
			&:focus-within {
				box-shadow: 0 0 3px 1px var(--primary-color);
			}
		}
	}
	select {
		box-sizing: border-box;
		padding: 0 6px;
		padding-inline: 0;
		width: 100%;
		height: 30px;
		line-height: 30px;
		background-color: #111;
		border-radius: 4px;
		transition: box-shadow 0.2s;
		cursor: pointer;
		&:focus-within {
			box-shadow: 0 0 3px 1px var(--primary-color);
		}
		&[multiple] {
			height: 80px;
		}
	}
	textarea {
		box-sizing: border-box;
		padding: 6px;
		width: 100%;
		min-height: 136px;
		background-color: #111;
		line-height: 34px;
		border-radius: 4px;
		resize: vertical;
		transition: box-shadow 0.2s;
		&:focus-within {
			box-shadow: 0 0 3px 1px var(--primary-color);
		}
	}
	input[type="checkbox"] {
		margin: auto 0;
		width: 20px;
		height: 20px;
		cursor: pointer;
	}
	.checkbox-group {
		display: flex;
		column-gap: 10px;
		flex-wrap: wrap;
		label {
			flex-shrink: 0;
			line-height: 30px;
			display: flex;
			align-items: center;
			column-gap: 6px;
			cursor: pointer;
			input {
				flex-shrink: 0;
				width: 20px;
				height: 20px;
				cursor: pointer;
			}
			span {
				font-size: 14px;
				@include text-ellipsis();
			}
		}
	}
	table {
		width: 100%;
		height: 30px;
		th,
		td {
			padding: 0 10px;
			min-height: 30px;
			line-height: 30px;
			border: 1px solid #ccc;
			white-space: nowrap;
		}
	}
}
.button-group {
	display: flex;
	column-gap: 10px;
}
